EnemyFactory = {};
local this = EnemyFactory;

function EnemyFactory.New()
    -- coroutine.start(this.CreateEnemy, 10,3, 4, "Enemy", ThunderManager.prefabs[3], 5);
    coroutine.start(this.CreateEnemy, 100,3, 4, "Enemy", ThunderManager.prefabs[6], 20);
   
end

function EnemyFactory.CreateEnemy(hp, speed, fireRate, tag, prefab, createTime)
--    while true do
--     coroutine.wait(createTime)
    local boss = Boss.new(hp,speed,fireRate, tag, prefab).gameObject;
    boss.transform.position = Vector3(math.random( -2.5, 2.5), 6, 0);
--    end
end